@use '../../../app.scss' as *;

.ai-assist {
  height: 100vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background-color: #f5f5f5;
}

.chat-history {
  flex: 1;
  padding: 0;
  overflow-y: auto;
  box-sizing: border-box;
}

.message-container,
.message-container-user {
  margin-bottom: 16px;
  padding: 5px 16px;
  box-sizing: border-box;
  display: flex;
}

.message-container {
  justify-content: flex-start;
  flex-direction: column;
  align-items: start;
  gap: 10px;
}

.message-container-user {
  justify-content: flex-end;
}

.chat-bubble-ai,
.chat-bubble-user {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
}

.chat-bubble-ai {
  max-width: 90%;
  padding: 0 12px;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chat-bubble-user {
  background-color: #0084ff;
  color: white;
}

.chat-time {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin: 10px 0;
}

.margin-top {
  margin-top: 8px;
}

.ai-list {
  margin-top: 8px;
  padding-left: 20px;

  .list-item {
    display: list-item;
    list-style-type: disc;
    margin-left: 5px;
  }
}

.suggestion-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.suggestion-bubble {
  background-color: #eee;
  padding: 8px 16px;
  border-radius: 16px;
  font-size: 14px;
  cursor: pointer;

  &:hover {
    background-color: #ddd;
  }
}

.task-card {
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.task-title {
  font-weight: 500;
}

.task-duration {
  font-size: 14px;
  color: #6b7280;
  margin-top: 4px;
}

.task-overview-container {
  margin-top: 12px;
}

.overview-label {
  font-size: 14px;
  color: #4b5563;
}

.overview-content {
  font-size: 14px;
  margin-top: 8px;
  background-color: #f9fafb;
  padding: 12px;
  border-radius: 6px;
}

.ai-note {
  font-size: 12px;
  color: #3b82f6;
  margin-top: 8px;
}

.assignment-container {
  margin-top: 12px;
  font-size: 14px;
}

.assignment-label {
  font-weight: 500;
  margin-bottom: 4px;
}

.student-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.student-chip {
  padding: 4px 12px;
  border-radius: 16px;
  background-color: #f3f4f6;
  font-size: 14px;
  cursor: pointer;

  &.selected {
    background-color: #3b82f6;
    color: white;
  }
}

.task-actions {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
}

.action-buttons-left {
  display: flex;
  gap: 8px;
}

.action-button {
  font-size: 12px;
  padding: 8px 12px;
  background-color: #e5e7eb;
  color: #4b5563;
  border-radius: 9999px;

  &:hover {
    background-color: #d1d5db;
  }
}

.publish-button {
  font-size: 14px;
  padding: 4px 16px;
  background-color: #3b82f6;
  color: white;
  border-radius: 9999px;

  &:hover {
    background-color: #2563eb;
  }
}

.typing-indicator {
  display: flex;
  background-color: #ffffff;
  width: 60px;
  padding: 12px 16px;
  border-radius: 18px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.typing-indicator Text {
  width: 8px;
  height: 8px;
  margin: 0 2px;
  background-color: #9e9ea1;
  border-radius: 50%;
  display: inline-block;
  animation: dotPulse 1.5s infinite ease-in-out;
}

.typing-indicator Text:nth-child(1) {
  animation-delay: 0s;
}

.typing-indicator Text:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator Text:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {

  0%,
  60%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  30% {
    transform: scale(1.5);
    opacity: 0.6;
  }
}

.chat-input-container {
  display: flex;
  padding: 12px 16px;
  background-color: #ffffff;
  border-top: 1px solid #e0e0e0;
  align-items: center;
  padding-bottom: 30px;
}

.chat-input {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  background-color: #f0f0f0;
  border-radius: 18px;
  font-size: 14px;
  margin-right: 10px;
}

.chat-send-button {
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 99999px;
  background-color: #3b82f6;
  transition: all 0.2s ease;
  cursor: pointer;

  &.disabled {
    background-color: #3b82f6;
    opacity: 0.5;
    cursor: not-allowed;
  }

  Image {
    width: 20px;
    height: 20px;
  }
}

/* 欢迎界面样式 */
.welcome-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  height: 100%;
  box-sizing: border-box;
}

.welcome-card {
  background-color: #ffffff;
  border-radius: 16px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.welcome-header {
  background-color: #3d7fff;
  padding: 16px;
  text-align: center;
}

.welcome-title {
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
}

.welcome-avatar {
  display: flex;
  justify-content: center;
  margin-top: -15px;
}

.avatar-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #42a5f5, #2979ff);
  border: 3px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 36px;
  font-weight: bold;
}

.welcome-content {
  padding: 15px 20px 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.welcome-text {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-bottom: 20px;
  text-align: center;
}

.welcome-features {
  width: 100%;
  margin-bottom: 25px;
}

.feature-item {
  margin: 10px 0;
  display: flex;
  align-items: center;
}

.feature-text {
  font-size: 14px;
  color: #555;
}

.start-hint {
  font-size: 13px;
  color: #777;
  text-align: center;
  margin-top: 5px;
  padding: 5px 10px;
  background-color: #f5f9ff;
  border-radius: 12px;
}

/* 滚动到底部按钮样式 */
.scroll-to-bottom-button {
  position: fixed;
  bottom: 100px;
  right: 10px;
}